<?php

/**
 * 接口基类
 * 作者：刘单风
 * 最后修改时间：2018-11-14
 * 版权：医库PHP小组
 */
namespace app\groupapi\controller;
use think\Controller;
use MoCommon\Support\Codes;
class Apibase extends Controller
{

    /**
     * 响应格式.
     *
     */
    public function respond($content = [], $status = '', $msg = '')
    {
        $result = [
            'status' => $status ?: Codes::ACTION_SUC,
            'msg' => $msg ?: Codes::get(Codes::ACTION_SUC),
            'data' => $content
        ];
        return json($result);
    }

}